package com.auto.survey.log

import com.auto.survey.base.CustomApplication
import java.util.Timer
import java.util.TimerTask

class MemoryLeakDetector {
    companion object {
        fun startMonitoring() {
            // 定时记录内存信息
            val timer = Timer()
            timer.schedule(object : TimerTask() {
                override fun run() {
                    AppLogger.getInstance(CustomApplication.getContext()).logMemoryInfo()
                }
            }, 0, 5 * 60 * 1000)  // 每5分钟记录一次
        }
    }
}